/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <gtest/gtest.h>

#include "sle_error_code.h"
#include "sle_connect_stub.h"
#include "sle_connect_callback_stub.h"
#include "sle_connect_proxy.h"
#include "mock_ipcobject_stub.h"
#include "g_val.h"

class SleConnectStubTest : public testing::Test {
public:
    static void SetUpTestCase();
    static void TearDownTestCase();
    void SetUp() override;
    void TearDown() override;

};
void SleConnectStubTest::SetUp()
{
}

void SleConnectStubTest::TearDown()
{
}

void SleConnectStubTest::SetUpTestCase()
{
}

void SleConnectStubTest::TearDownTestCase()
{
}

namespace OHOS {
namespace NearLink {
namespace SleStandard {

class SleConnectStubMock : public SleConnectStub {
    public:
        SleErrorCode RegisterConnectCallback(const sptr<ISleConnectCallback> &callback)
        {
            return SLE_NO_ERROR;
        }
        SleErrorCode UnregisterConnectCallback(const sptr<ISleConnectCallback> &callback)
            {
                return SLE_NO_ERROR;
            }
        SleErrorCode Connect(const SleAddress &address)
            {
                return SLE_NO_ERROR;
            }
        SleErrorCode Disconnect(const SleAddress &address)
            {
                return SLE_NO_ERROR;
            }
        SleErrorCode GetConnectId(const SleAddress &address, uint16_t &connectId)
        {
            connectId = 1;
            return SLE_NO_ERROR;
        }
        SleErrorCode GetConnectState(const SleAddress &address, int32_t &state)
        {
            state = 1;
            return SLE_NO_ERROR;
        }
        SleErrorCode GetConnectDeviceList(std::vector<SleConnectDevice> &devices, uint16_t &number)
        {
            for(int i = 0; i < 2; i++)
            {
                SleConnectDevice device;
                devices.push_back(device);
            }
            number = devices.size();
            return SLE_NO_ERROR;
        }
        SleErrorCode UpdateConnectParam(uint16_t connectId, const SleConnectionParam &param)
        {
            return SLE_NO_ERROR;
        }
        SleErrorCode SendPairRequest(const SleAddress &address)
        {
            return SLE_NO_ERROR;
        }
        SleErrorCode RemovePairedDevice(const SleAddress &address)
        {
            return SLE_NO_ERROR;
        }
        SleErrorCode RemoveAllPairedDevices()
        {
            return SLE_NO_ERROR;
        }
        SleErrorCode GetPairedDevicesNum(uint16_t &number)
        {
            number = 1;
            return SLE_NO_ERROR;
        }
        SleErrorCode GetPairedDevices(std::vector<SleAddress> &devices, uint16_t &number)
        {
            for(int i = 0; i < 2; i++)
            {
                SleAddress address;
                devices.push_back(address);
            }
            number = devices.size();
            return SLE_NO_ERROR;
        }
        SleErrorCode GetPairState(const SleAddress &address, uint8_t &state)
        {
            state = 1;
            return SLE_NO_ERROR;
        }
        SleErrorCode ReadRemoteRssi(uint16_t connectId)
        {
            return SLE_NO_ERROR;
        }
};

class SleConnectCallbackStubMock : public SleConnectCallbackStub {
    public:
        void OnConnectStateChange(
            uint16_t connectId, const SleAddress &address, int32_t state, int32_t pairState, uint16_t reason)
            {

            }
        void OnConnectParamUpdateComplete(
            uint16_t connectId, uint16_t interval, uint16_t latency, uint16_t timeout, uint32_t errCode){}
        void OnAuthComplete(
            uint16_t connectId, const SleAddress &address, const SleAuthenticationInfo &info, uint32_t errCode){}
        void OnPairComplete(uint16_t connectId, const SleAddress &address, uint32_t errCode){}
        void OnReadRssiComplete(uint16_t connectId, int8_t rssi, uint32_t errCode){}
};



/****************************************************frameworks stub  test **************************************************************************** */

HWTEST_F(SleConnectStubTest, OnConnectStateChangeInner_201, testing::ext::TestSize.Level0)
{
    SleConnectCallbackStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectCallbackStub::GetDescriptor());

    data.WriteInt16(1);
    SleAddress addr;
    data.WriteParcelable(&addr);
    data.WriteInt32(1);
    data.WriteInt32(1);
    data.WriteInt16(1);

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_CALLBACK_CONNECT_STATE, data, reply, option), NO_ERROR);
}

HWTEST_F(SleConnectStubTest, OnConnectParamUpdateCompleteInner_201, testing::ext::TestSize.Level0)
{
    SleConnectCallbackStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectCallbackStub::GetDescriptor());

    data.WriteInt16(1);
    data.WriteInt16(1);
    data.WriteInt16(1);
    data.WriteInt16(1);
    data.WriteInt32(1);
    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_CALLBACK_CONNECT_PARAM_UPDATE_COMPLETE, data, reply, option), NO_ERROR);
}


HWTEST_F(SleConnectStubTest, OnAuthCompleteInner_201, testing::ext::TestSize.Level0)
{
    SleConnectCallbackStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectCallbackStub::GetDescriptor());

    data.WriteInt16(1);
    SleAddress sleaddr;
    SleAuthenticationInfo sInfo;
    data.WriteParcelable(&sleaddr);
    data.WriteParcelable(&sInfo);
    data.WriteUint32(1);
    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_CALLBACK_AUTH_COMPLETE, data, reply, option), NO_ERROR);
}


HWTEST_F(SleConnectStubTest, OnPairCompleteInner_201, testing::ext::TestSize.Level0)
{
    SleConnectCallbackStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectCallbackStub::GetDescriptor());

    data.WriteInt16(1);
    SleAddress addr;
    data.WriteParcelable(&addr);
    data.WriteInt32(1);
    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_CALLBACK_PAIR_COMPLETE, data, reply, option), NO_ERROR);
}


HWTEST_F(SleConnectStubTest, OnReadRssiCompleteInner_201, testing::ext::TestSize.Level0)
{
    SleConnectCallbackStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectCallbackStub::GetDescriptor());

    data.WriteInt16(1);
    data.WriteInt8(1);
    data.WriteInt32(1);
    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_CALLBACK_READ_RSSI, data, reply, option), NO_ERROR);
}




/****************************************************frameworks stub  test **************************************************************************** */


/****************************************************frameworks proxy  test **************************************************************************** */

HWTEST_F(SleConnectStubTest, UnregisterConnectCallback_101, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 0;
    sptr<SleConnectCallbackStubMock> callback = new SleConnectCallbackStubMock();
    SleErrorCode result = proxy->UnregisterConnectCallback(  callback);
    EXPECT_EQ(result, (SleErrorCode)0);

}

HWTEST_F(SleConnectStubTest, UnregisterConnectCallback_102, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 1;
    sptr<SleConnectCallbackStubMock> callback = new SleConnectCallbackStubMock();
    SleErrorCode result = proxy->UnregisterConnectCallback(  callback);
    EXPECT_EQ(result, (SleErrorCode)7);

}


HWTEST_F(SleConnectStubTest, RegisterConnectCallback_101, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 0;
    sptr<SleConnectCallbackStubMock> callback = new SleConnectCallbackStubMock();
    SleErrorCode result = proxy->RegisterConnectCallback(  callback);
    EXPECT_EQ(result, (SleErrorCode)0);

}

HWTEST_F(SleConnectStubTest, RegisterConnectCallback_102, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 1;
    sptr<SleConnectCallbackStubMock> callback = new SleConnectCallbackStubMock();
    SleErrorCode result = proxy->RegisterConnectCallback( callback);
    EXPECT_EQ(result, (SleErrorCode)7);
}


HWTEST_F(SleConnectStubTest, Connect_101, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 0;

    SleAddress address;
    SleErrorCode result = proxy->Connect(  address);
    EXPECT_EQ(result, (SleErrorCode)0);

}

HWTEST_F(SleConnectStubTest, Connect_102, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 1;

    SleAddress address;
    SleErrorCode result = proxy->Connect( address);
    EXPECT_EQ(result, (SleErrorCode)7);
}


HWTEST_F(SleConnectStubTest, GetConnectId_101, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 0;

    SleAddress address;
    uint16_t connectId = 1;
    SleErrorCode result = proxy->GetConnectId(  address,connectId);
    EXPECT_EQ(result, (SleErrorCode)0);

}

HWTEST_F(SleConnectStubTest, GetConnectId_102, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 1;

    SleAddress address;
    uint16_t connectId = 1;
    SleErrorCode result = proxy->GetConnectId(  address,connectId);
    EXPECT_EQ(result, (SleErrorCode)7);
}


HWTEST_F(SleConnectStubTest, GetConnectState_101, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 0;

    SleAddress address;
    int32_t state = 1;
    SleErrorCode result = proxy->GetConnectState(  address,state);
    EXPECT_EQ(result, (SleErrorCode)0);

}

HWTEST_F(SleConnectStubTest, GetConnectState_102, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 1;

    SleAddress address;
    int32_t state = 1;
    SleErrorCode result = proxy->GetConnectState(  address,state);
    EXPECT_EQ(result, (SleErrorCode)7);
}

HWTEST_F(SleConnectStubTest, UpdateConnectParam_101, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 0;

    uint16_t connectId = 1;
    SleConnectionParam param;
    SleErrorCode result = proxy->UpdateConnectParam(  connectId,param);
    EXPECT_EQ(result, (SleErrorCode)0);

}

HWTEST_F(SleConnectStubTest, UpdateConnectParam_102, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 1;

    uint16_t connectId = 1;
    SleConnectionParam param;
    SleErrorCode result = proxy->UpdateConnectParam(  connectId,param);
    EXPECT_EQ(result, (SleErrorCode)7);
}

HWTEST_F(SleConnectStubTest, GetPairedDevicesNum_101, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 0;

    uint16_t number = 0;
    SleErrorCode result = proxy->GetPairedDevicesNum(  number);
    EXPECT_EQ(result, (SleErrorCode)0);

}

HWTEST_F(SleConnectStubTest, GetPairedDevicesNum_102, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 1;

    uint16_t number = 0;
    SleErrorCode result = proxy->GetPairedDevicesNum(  number);
    EXPECT_EQ(result, (SleErrorCode)7);
}



HWTEST_F(SleConnectStubTest, ReadRemoteRssi_101, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 0;

    uint16_t connectId = 0;
    SleErrorCode result = proxy->ReadRemoteRssi(  connectId);
    EXPECT_EQ(result, (SleErrorCode)0);

}

HWTEST_F(SleConnectStubTest, ReadRemoteRssi_102, testing::ext::TestSize.Level0)
{
    sptr<IRemoteObject> mockStub = new MockIPCObjectStub(u"test");
    std::shared_ptr<SleConnectProxy> proxy = std::make_shared<SleConnectProxy>(mockStub);
    g_ControlVal = 1;

    uint16_t connectId = 0;
    SleErrorCode result = proxy->ReadRemoteRssi(  connectId);
    EXPECT_EQ(result, (SleErrorCode)7);
}


/****************************************************frameworks proxy  test **************************************************************************** */



/****************************************************ipc  test **************************************************************************** */
HWTEST_F(SleConnectStubTest, RegisterConnectCallbackInner_001, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    sptr<IRemoteObject> remoteObject = new SleConnectCallbackStubMock();
    data.WriteRemoteObject(remoteObject);

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_REGISTER_CONNECT_CALLBACK, data, reply, option), NO_ERROR);
}

/*******************************************************001*************************************************************** */
HWTEST_F(SleConnectStubTest, UnregisterConnectCallbackInner_002, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    sptr<IRemoteObject> remoteObject = new SleConnectCallbackStubMock();
    data.WriteRemoteObject(remoteObject);

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_UNREGISTER_CONNECT_CALLBACK, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */
HWTEST_F(SleConnectStubTest, ConnectInner_003, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    SleAddress sleaddr;
    data.WriteParcelable(&sleaddr);

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_CONNECT, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */
HWTEST_F(SleConnectStubTest, DisconnectInner_004, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    SleAddress sleaddr;
    data.WriteParcelable(&sleaddr);
    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_DISCONNECT, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */
HWTEST_F(SleConnectStubTest, GetConnectIdInner_005, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    SleAddress sleaddr;
    data.WriteParcelable(&sleaddr);

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_GET_CONNECT_ID, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */
HWTEST_F(SleConnectStubTest, GetConnectStateInner_006, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    SleAddress sleaddr;
    data.WriteParcelable(&sleaddr);

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_GET_CONNECT_STATE, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */
HWTEST_F(SleConnectStubTest, GetConnectDeviceListInner__007, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_GET_CONNECT_DEVICE_LIST, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */
HWTEST_F(SleConnectStubTest, UpdateConnectParamInner_008, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    data.WriteUint16(0);
    SleConnectionParam param;
    data.WriteParcelable(&param);
    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_UPDATE_CONNECT_PARAM, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */
HWTEST_F(SleConnectStubTest, SendPairRequestInner_009, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    SleAddress sleaddr;
    data.WriteParcelable(&sleaddr);

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_SEND_PAIR_REQUEST, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */
HWTEST_F(SleConnectStubTest, RemovePairedDeviceInner_010, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    SleAddress sleaddr;
    data.WriteParcelable(&sleaddr);

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_REMOVE_PAIRED_DEVICE, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */


HWTEST_F(SleConnectStubTest, RemoveAllPairedDevicesInner_011, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_REMOVE_ALL_PAIRED_DEVICES, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */


HWTEST_F(SleConnectStubTest, GetPairedDevicesNumInner_012, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_GET_PAIRED_DEVICES_NUMBER, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */


HWTEST_F(SleConnectStubTest, GetPairedDevicesInner_013, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_GET_PAIRED_DEVICES, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */



HWTEST_F(SleConnectStubTest, GetPairStateInner_014, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    SleAddress sleaddr;
    data.WriteParcelable(&sleaddr);
    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_GET_PAIR_STATE, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */


HWTEST_F(SleConnectStubTest, ReadRemoteRssiInner_015, testing::ext::TestSize.Level0)
{
    SleConnectStubMock ssapClient;
    MessageParcel data;
    MessageParcel reply;
    MessageOption option;
    data.WriteInterfaceToken(SleConnectStub::GetDescriptor());

    data.WriteUint16(0);
    EXPECT_EQ(ssapClient.OnRemoteRequest(SLE_READ_REMOTE_RSSI, data, reply, option), NO_ERROR);
}

/********************************************************************************************************************** */



}}}